package com.wwtech.epp.ui.activity.friend.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.friend.GroupInfoActivity;
import com.wwtech.epp.ui.activity.friend.contract.GroupInfoContract;
import com.wwtech.epp.ui.activity.friend.presenter.GroupInfoPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.friend
 * @Description: The moduele of GroupInfoActivity, provide field for GroupInfoActivity
 * @date 2017/12/06 11:49:09
 */
@Module
public class GroupInfoModule {
    private final GroupInfoContract.View mView;


    public GroupInfoModule(GroupInfoContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public GroupInfoPresenter provideGroupInfoPresenter(HttpAPIWrapper httpAPIWrapper, GroupInfoActivity mActivity) {
        return new GroupInfoPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public GroupInfoActivity provideGroupInfoActivity() {
        return (GroupInfoActivity) mView;
    }
}